import request from '@/utils/request'

// 获取openid
export function getOpenid(data = {}) {
  return request({
    url: '/wx/token/getOpenId',
    method: 'post',
    data
  })
}

// 初始化
export function getJspToken(data) {
  return request({
    url: '/wx/token/getSignature',
    method: 'post',
    data
  })
}

// 获取用户信息
export function GetUserInfo(data) {
  return request({
    url: '/wx/token/getUserInfo',
    method: 'post',
    data
  })
}


// 下单
export function createJsApiOrder(data = {}) {
  return request({
    url: '/wx/pay/createJsApiOrder',
    method: 'post',
    data
  })
}

// 获取学校
export function getSchoolList(data = {}) {
  return request({
    url: '/stu/school/getSchoolList',
    method: 'post',
    data
  })
}

// 获取年级
export function getGradeList(params = {}) {
  return request({
    url: '/stu/grade/getGradeList',
    method: 'get',
    params
  })
}

// 获取班级
export function getClassList(params = {}) {
  return request({
    url: '/stu/class/getClassList',
    method: 'get',
    params
  })
}

// 获取省市区
export function getProvinceList(data = {}) {
  return request({
    url: '/stu/province/getProvinceList',
    method: 'post',
    data
  })
}

// 获取会员码详情
export function GetMemberCodeInfo(data = {}) {
  return request({
    url: '/member/getMemberCodeInfo',
    method: 'post',
    data
  })
}
